package cn.com.bdqn.dao;

import cn.com.bdqn.entity.SyEmp;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SyEmpDao {

    public List<SyEmp> queryByLike(SyEmp syEmp);

    @Select("select * from sy_emp where id = #{value}")
    public SyEmp queryById(Long id);

    public int updateSyEmp(SyEmp syEmp);

    @Insert("insert into sy_emp values\n" +
            "(default,#{empName},#{empNo},#{pwd},#{deptId},#{remark},0)")
    public int addSyEmp(SyEmp syEmp);

    @Delete("delete from sy_emp where id = #{value}")
    public int delSyEmp(Long id);
}
